import request from "@/utils/request";

export function selectAllCourse(data){
    return request({
        url:'/course/selectAllCourseByPage',
        method: 'GET',
        params: data
    })
}

export function selectAllCategory(data){
    return request({
        url:'/course/selectAllCategory',
        method: 'GET',
        params: data
    })
}




export function addCourse(data){
    return request({
        url:'/course/addCourse',
        method: 'POST',
        data: data
    })
}


export function getCourse(data){
    return request({
        url:'/course/getCourse',
        method: 'GET',
        params: data
    })
}

export function updateCourse(data){
    return request({
        url:'/course/updateCourse',
        method: 'PUT',
        data: data
    })
}


export function deleteCourse(data){
    return request({
        url:'/course/deleteCourse/' + data,
        method: 'PUT',
    })
}

export function upload(data){

    return request({
        url:'/files/upload',
        method:'post',
        data: data,

    })
}

export function updateCourseStatus(data){
    return request({
        url:'/course/updateCourseStatus',
        method: 'PUT',
        data: data
    })
}











